#Makefile: Makefile to compile source code
#Author: Andy Wu

OPT = -Wall -g -pedantic

all: dseg

dseg: dsegtest.cc dsegment.o AssemblerClasses.o
	g++ $(OPT) dsegtest.cc dsegment.o AssemblerClasses.o -o dseg

dsegment.o: dsegment.cc dsegment.h
	g++ $(OPT) -c dsegment.cc -o dsegment.o

hasher.o: hasher.cc EncodedStructs.h hashtbl.h
	g++ -o hasher.o $(OPT) -c hasher.cc

hashtbl.o: hashtbl.cc hashtbl.h
	g++ -o hashtbl.o $(OPT) -c hashtbl.cc

AssemblerClasses.o: AssemblerClasses.cpp AssemblerClasses.hh
	g++ $(OPT) AssemblerClasses.cpp -c -o AssemblerClasses.o

clean:
	rm -f *.o dseg
